package mr.ali.video.web.mapper;

import mr.ali.video.web.model.Permission;
import mr.ali.video.web.model.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* <p>
    *  Mapper 接口
    * </p>
*
* @author Mr-ali
* @since 2024-09-17
*/
    @Repository
    public interface UserMapper extends BaseMapper<User> {
    @Select("select * from user where username =#{username}")
    User UserByUsername(String username);

    /**
     * 用户权限信息
     */
    @Select("select id , authority from permission")
    List<Permission> SelectPermissionsById();

}
